package com.companyName.generator;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JTextField;

public class GenerateCodeListener implements ActionListener {
	
	private JTextField txtSampleDir;
	private JTextField txtTargetDir;
	private JTextField txtProjectName;
	private JTextField txtCompanyName;
	
	public GenerateCodeListener(JTextField txtSampleDir, JTextField txtTargetDir, JTextField txtProjectName, JTextField txtCompanyName){
		this.txtSampleDir = txtSampleDir;
		this.txtTargetDir = txtTargetDir;
		this.txtProjectName = txtProjectName;
		this.txtCompanyName = txtCompanyName;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		CodeGenerator generator = new CodeGenerator();
		
		
		generator.generate(txtSampleDir.getText(), txtTargetDir.getText(), txtProjectName.getText(),txtCompanyName.getText());
	}

}
